using System;
using System.Collections;

using System.Runtime.Remoting;
using System.Runtime.Remoting.Channels;
using System.Runtime.Remoting.Channels.Http;
using System.Collections.Generic;

namespace ChatLib
{
	[Serializable]
	public class LetterReceive
	{
		string message;
		string from;

		public LetterReceive(string message,string from)
		{
			this.message=message;
			this.from=from;
		}

		public string Message
		{
			get
			{return message;}
		}

		public string From
		{
			get
			{return from;}
		}
	}

	public interface IServer
	{
		bool SignUp(string username,string password);
		bool ChangePassword(string username,string curPassword,string newPassword);
		bool SignIn(string username,string password,bool visible);
		bool SignOut(string username);		
		
		bool IsVisible(string username);
		bool AddContact(string username,string contact);
		bool RemoveContact(string username,string contact);
		ArrayList GetContacts(string username);

		bool Send(string from,string to,string message);
		
		bool StartScreencast(string title, string ipAdress);
		void StopScreencast(string ipAdress);
		ArrayList GetScreencasts();

		void SendScreencastMessage(string username, string message);
		ArrayList GetScreencastConversation();

		void SendTask(string from, string to, string task);
		void CompleteTask(string username, string task);
		ArrayList GetTasks(string username);

		LetterReceive Receive(string to);
		ArrayList ReceiveOffline(string to);
	}
}